home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d880.lha
/
Oberon
/
O3Demo2.lzh
/
Definitions
/
Graphics.def
< prev
next >
Wrap
Text File
|
1993-01-15
|
35KB
|
1,174 lines
DEFINITION Graphics;
IMPORT
e := Exec,
u := Utility,
h := Hardware;
TYPE
RectanglePtr = UNTRACED POINTER TO Rectangle;
Rect32Ptr = UNTRACED POINTER TO Rect32;
PointPtr = UNTRACED POINTER TO Point;
BitMapPtr = UNTRACED POINTER TO BitMap;
LayerPtr = UNTRACED POINTER TO Layer;
ClipRectPtr = UNTRACED POINTER TO ClipRect;
CopInsPtr = UNTRACED POINTER TO CopIns;
CopInsCLPtr = UNTRACED POINTER TO CopInsCL;
CprlistPtr = UNTRACED POINTER TO Cprlist;
CopListPtr = UNTRACED POINTER TO CopList;
UCopListPtr = UNTRACED POINTER TO UCopList;
CopinitPtr = UNTRACED POINTER TO Copinit;
ExtendedNodePtr = UNTRACED POINTER TO ExtendedNode;
MonitorSpecPtr = UNTRACED POINTER TO MonitorSpec;
AnalogSignalIntervalPtr = UNTRACED POINTER TO AnalogSignalInterval;
SpecialMonitorPtr = UNTRACED POINTER TO SpecialMonitor;
QueryHeaderPtr = UNTRACED POINTER TO QueryHeader;
DisplayInfoPtr = UNTRACED POINTER TO DisplayInfo;
DimensionInfoPtr = UNTRACED POINTER TO DimensionInfo;
MonitorInfoPtr = UNTRACED POINTER TO MonitorInfo;
NameInfoPtr = UNTRACED POINTER TO NameInfo;
VSpritePtr = UNTRACED POINTER TO VSprite;
BobPtr = UNTRACED POINTER TO Bob;
AnimCompPtr = UNTRACED POINTER TO AnimComp;
AnimObPtr = UNTRACED POINTER TO AnimOb;
DBufPacketPtr = UNTRACED POINTER TO DBufPacket;
CollTablePtr = UNTRACED POINTER TO CollTable;
IsrvstrPtr = UNTRACED POINTER TO Isrvstr;
LayerInfoPtr = UNTRACED POINTER TO LayerInfo;
AreaInfoPtr = UNTRACED POINTER TO AreaInfo;
TmpRasPtr = UNTRACED POINTER TO TmpRas;
GelsInfoPtr = UNTRACED POINTER TO GelsInfo;
RastPortPtr = UNTRACED POINTER TO RastPort;
RegionRectanglePtr = UNTRACED POINTER TO RegionRectangle;
RegionPtr = UNTRACED POINTER TO Region;
BitScaleArgsPtr = UNTRACED POINTER TO BitScaleArgs;
SimpleSpritePtr = UNTRACED POINTER TO SimpleSprite;
TextAttrPtr = UNTRACED POINTER TO TextAttr;
TTextAttrPtr = UNTRACED POINTER TO TTextAttr;
TextFontPtr = UNTRACED POINTER TO TextFont;
TextFontExtensionPtr = UNTRACED POINTER TO TextFontExtension;
ColorFontColorsPtr = UNTRACED POINTER TO ColorFontColors;
ColorTextFontPtr = UNTRACED POINTER TO ColorTextFont;
TextextentPtr = UNTRACED POINTER TO Textextent;
ViewPortPtr = UNTRACED POINTER TO ViewPort;
ViewPtr = UNTRACED POINTER TO View;
ViewExtraPtr = UNTRACED POINTER TO ViewExtra;
ViewPortExtraPtr = UNTRACED POINTER TO ViewPortExtra;
RasInfoPtr = UNTRACED POINTER TO RasInfo;
ColorMapPtr = UNTRACED POINTER TO ColorMap;
GfxBasePtr = UNTRACED POINTER TO GfxBase;
Rectangle = STRUCT
minX,minY : INTEGER;
maxX,maxY : INTEGER;
END;
Rect32 = STRUCT
minX,minY : LONGINT;
maxX,maxY : LONGINT;
END;
Point = STRUCT
x,y : INTEGER;
END;
PLANEPTR = e.APTR;
BitMap = STRUCT
bytesPerRow : INTEGER;
rows : INTEGER;
flags : e.BYTE;
depth : SHORTINT;
pad : INTEGER;
planes : ARRAY 8 OF PLANEPTR;
END;
Layer = STRUCT
front,back : LayerPtr;
clipRect : ClipRectPtr;
rp : RastPortPtr;
bounds : Rectangle;
reserved : ARRAY 4 OF e.BYTE;
priority : INTEGER;
flags : SET;
superBitMap : BitMapPtr;
superClipRect : ClipRectPtr;
window : e.APTR;
scrollX,scrollY : INTEGER;
cr,cr2,crnew : ClipRectPtr;
superSaveClipRects : ClipRectPtr;
cliprects : ClipRectPtr;
layerInfo : LayerInfoPtr;
lock : e.SignalSemaphore;
backFill : u.HookPtr;
reserved1 : LONGINT;
clipRegion : RegionPtr;
saveClipRects : RegionPtr;
width,height : INTEGER;
reserved2 : ARRAY 18 OF e.BYTE;
damageList : RegionPtr;
END;
ClipRect = STRUCT
next : ClipRectPtr;
prev : ClipRectPtr;
lobs : LayerPtr;
bitMap : BitMapPtr;
bounds : Rectangle;
p1,p2 : ClipRectPtr;
reserved : LONGINT;
flags : LONGSET;
END;
CONST
needsNoConcealedRasters = 1;
needsNoLayerBlitDamage = 2;
isLessX = 1;
isLessY = 2;
isGrtrX = 4;
isGrtrY = 8;
borderHit = 0;
topHit = 1;
bottomHit = 2;
leftHit = 4;
rightHit = 8;
move = 0;
wait = 1;
next = 2;
ntLof = 15;
ntSht = 14;
ntSys = 13;
TYPE
CopIns = STRUCT
opCode : INTEGER;
destAddr : INTEGER;
destData : INTEGER;
END;
CopInsCL = STRUCT
opCode : INTEGER;
nxtList : CopListPtr;
END;
Cprlist = STRUCT
next : CprlistPtr;
start : e.APTR;
maxCount : INTEGER;
END;
CopList = STRUCT
next : CopListPtr;
copList : CopListPtr;
viewPort : ViewPortPtr;
copIns : CopInsPtr;
copPtr : CopInsPtr;
copLStart : e.APTR;
copSStart : e.APTR;
count : INTEGER;
maxCount : INTEGER;
dyOffset : INTEGER;
cop2Start : e.APTR;
cop3Start : e.APTR;
cop4Start : e.APTR;
cop5Start : e.APTR;
END;
UCopList = STRUCT
next : UCopListPtr;
firstCopList : CopListPtr;
copList : CopListPtr;
END;
Copinit = STRUCT
vsyncHblank : ARRAY 2 OF INTEGER;
diwstart : ARRAY 4 OF INTEGER;
diagstart : ARRAY 4 OF INTEGER;
sprstrtup : ARRAY (2 * 8 * 2) OF INTEGER;
wait14 : ARRAY 2 OF INTEGER;
normHblank : ARRAY 2 OF INTEGER;
genloc : ARRAY 4 OF INTEGER;
jump : ARRAY 2 * 2 OF INTEGER;
waitForever : ARRAY 2 OF INTEGER;
sprstop : ARRAY 4 OF INTEGER;
END;
CONST
mode640 = 15;
plnCntMsk = {0.nCntMsk..2};
plnCntShft = 12;
pf2pri = 6;
colorOn = 9;
dblpf = 10;
holdnmodify = 11;
interlace = 2;
fineScroll = {0.neScroll..3};
fineScrollShift = 4;
fineScrollMask = {0.neScrollMask..3};
horizPos = {0.rizPos..6};
vrtclPos = {0.tclPos..8};
vrtclPosShift = 7;
dftchMask = {0.tchMask..7};
vposrlof = {15};
TYPE
ExtendedNode = STRUCT (node : e.Node)
subsystem : SHORTINT;
subtype : SHORTINT;
library : LONGINT;
init : e.PROC;
END;
CONST
ssGraphics = 2;
viewExtraType = 1;
viewPortExtraType = 2;
specialMonitorType = 3;
monitorSpecType = 4;
TYPE
MonitorSpec = STRUCT (node : ExtendedNode)
flags : SET;
ratioh : LONGINT;
ratiow : LONGINT;
totalRows : INTEGER;
totalColorclocks : INTEGER;
deniseMaxDisplayColumn : INTEGER;
beamCon0 : INTEGER;
minRow : INTEGER;
special : SpecialMonitorPtr;
openCount : INTEGER;
transform : e.PROC;
translate : e.PROC;
scale : e.PROC;
xoffset : INTEGER;
yoffset : INTEGER;
legalView : Rectangle;
maxoscan : e.PROC;
videoscan : e.PROC;
deniseMinDisplayColumn : INTEGER;
displayCompatible : LONGINT;
displayInfoDataBase : e.List;
displayInfoDataBaseSemaphore : e.SignalSemaphore;
reserved00 : LONGINT;
reserved01 : LONGINT;
END;
CONST
toMonitor = 0;
fromMonitor = 1;
standardXOffset = 9;
standardYOffset = 0;
requestNTSC = 1;
requestPAL = 2;
requestSpecial = 4;
requestA2024 = 8;
defaultMonitorName = "default.monitor";
ntscMonitorName = "ntsc.monitor";
palMonitorName = "pal.monitor";
standardMonitorMask = requestNTSC + requestPAL;
standardNTSCRows = 262;
standardPALRows = 312;
standardColorClocks = 226;
standardDeniseMax = 455;
standardDeniseMin = 93;
standardNTSCBeamCon = {};
standardPALBeamCon = {h.displayPal};
specialBeamCon = {h.varVBlank, h.loLDis, h.varVSync, h.varBeam, h.csBlank};
minNTSCRow = 21;
minPALRow = 29;
standardViewX = 81H;
standardViewY = 2CH;
standardHBStrt = 06H;
standardHSStrt = 0BH;
standardHSStop = 1CH;
standardHBStop = 2CH;
standardVBStrt = 0122H;
standardVSStrt = 02A6H;
standardVSStop = 03AAH;
standardVBStop = 1066H;
vgaColorClocks = standardColorClocks DIV 2;
vgaTotalRows = standardNTSCRows * 2;
vgaDeniseMin = 59;
minvgaRow = 29;
vgaHBStrt = 08H;
vgaHSStrt = 0EH;
vgaHSStop = 1CH;
vgaHBStop = 1EH;
vgaVBStrt = 0000H;
vgaVSStrt = 0153H;
vgaVSStop = 0235H;
vgaVBStop = 0CCDH;
vgaMonitorName = "vga.monitor";
vga70ColorClocks = standardColorClocks DIV 2;
vga70TotalRows = 449;
vga70DeniseMin = 59;
minvga70Row = 35;
vga70HBStrt = 08H;
vga70HSStrt = 0EH;
vga70HSStop = 1CH;
vga70HBStop = 1EH;
vga70VBStrt = 0000H;
vga70VSStrt = 02A6H;
vga70VSStop = 0388H;
vga70VBStop = 0F73H;
vga70BeamCon = specialBeamCon / {h.vSyncTrue};
vga70MonitorName = "vga70.monitor";
broadcastHBStrt = 01H;
broadcastHSStrt = 06H;
broadcastHSStop = 17H;
broadcastHBStop = 27H;
broadcastVBStrt = 0000H;
broadcastVSStrt = 02A6H;
broadcastVSStop = 054CH;
broadcastVBStop = 1C40H;
broadcastBeamCon = {h.loLDis, h.csBlank};
ratioFixedPart = 4;
rationUnity = ASH(1, ratioFixedPart);
TYPE
AnalogSignalInterval = STRUCT
start : INTEGER;
stop : INTEGER;
END;
SpecialMonitor = STRUCT (node : ExtendedNode)
flags : SET;
doMonitor : e.PROC;
reserved1 : e.PROC;
reserved2 : e.PROC;
reserved3 : e.PROC;
hblank : AnalogSignalInterval;
vblank : AnalogSignalInterval;
hsync : AnalogSignalInterval;
vsync : AnalogSignalInterval;
END;
DisplayInfoHandle = e.APTR;
CONST
dtagDisp = 80000000H;
dtagDims = 80001000H;
dtagMntr = 80002000H;
dtagName = 80003000H;
TYPE
QueryHeader = STRUCT
structID : LONGINT;
displayID : LONGINT;
skipID : LONGINT;
length : LONGINT;
END;
DisplayInfo = STRUCT (header : QueryHeader)
notAvailable : INTEGER;
propertyFlags : LONGSET;
resolution : Point;
pixelSpeed : INTEGER;
numStdSprites : INTEGER;
paletteRange : INTEGER;
spriteResolution : Point;
pad : ARRAY 4 OF e.BYTE;
reserved : ARRAY 2 OF LONGINT;
END;
CONST
availNoChips = 0001H;
availNoMonitor = 0002H;
availNotWithGenlock = 0004H;
isLace = 0;
isDualPF = 1;
isPF2pri = 2;
isHAM = 3;
isECS = 4;
isPAL = 5;
isSprites = 6;
isGenlock = 7;
isWB = 8;
isDraggable = 9;
isPanelled = 10;
isBeamSync = 11;
isExtraHalfBrite = 12;
TYPE
DimensionInfo = STRUCT (header : QueryHeader)
maxDepth : INTEGER;
minRasterWidth : INTEGER;
minRasterHeight : INTEGER;
maxRasterWidth : INTEGER;
maxRasterHeight : INTEGER;
nominal : Rectangle;
maxOScan : Rectangle;
videoOScan : Rectangle;
txtOScan : Rectangle;
stdOScan : Rectangle;
pad : ARRAY 14 OF e.BYTE;
reserved : ARRAY 2 OF LONGINT;
END;
MonitorInfo = STRUCT (header : QueryHeader)
mspc : MonitorSpecPtr;
viewPosition : Point;
viewResolution : Point;
viewPositionRange : Rectangle;
totalRows : INTEGER;
totalColorClocks : INTEGER;
minRow : INTEGER;
compatibility : INTEGER;
pad : ARRAY 36 OF e.BYTE;
reserved : ARRAY 2 OF LONGINT;
END;
CONST
mCompatMixed = 0;
mCompatSelf = 1;
mCompatNobody = -1;
displayNameLen = 32;
TYPE
NameInfo = STRUCT (header : QueryHeader)
name : ARRAY displayNameLen OF CHAR;
reserved : ARRAY 2 OF LONGINT;
END;
CONST
invalidID = -1;
monitorIDMask = 0FFFF1000H;
defaultMonitorID = 00000000H;
ntscMonitorID = 00011000H;
palMonitorID = 00021000H;
loresKey = 00000000H;
hiresKey = 00008000H;
superKey = 00008020H;
hamKey = 00000800H;
loresLaceKey = 00000004H;
hiresLaceKey = 00008004H;
superLaceKey = 00008024H;
hamLaceKey = 00000804H;
loresDPFKey = 00000400H;
hiresDPFKey = 00008400H;
superDPFKey = 00008420H;
loresLaceDPFKey = 00000404H;
hiresLaceDPFKey = 00008404H;
superLaceDPFKey = 00008424H;
loresDPF2Key = 00000440H;
hiresDPF2Key = 00008440H;
superDPF2Key = 00008460H;
loresLaceDPF2Key = 00000444H;
hiresLaceDPF2Key = 00008444H;
superLaceDPF2Key = 00008464H;
extraHalfBriteKey = 00000080H;
extraHalfBriteLaceKey = 00000084H;
vgaMonitorID = 00031000H;
vgaExtraLoresKey = 00031004H;
vgaLoresKey = 00039004H;
vgaProductKey = 00039024H;
vgaHAMKey = 00031804H;
vgaExtraLoresLaceKey = 00031005H;
vgaLoresLaceKey = 00039005H;
vgaProductLaceKey = 00039025H;
vgaHAMLaceKey = 00031805H;
vgaExtraLoresDPFKey = 00031404H;
vgaLoresDPFKey = 00039404H;
vgaProductDPFKey = 00039424H;
vgaExtraLoresLaceDPFKey = 00031405H;
vgaLoresLaceDPFKey = 00039405H;
vgaProductLaceDPFKey = 00039425H;
vgaExtraLoresDPF2Key = 00031444H;
vgaLoresDPF2Key = 00039444H;
vgaProductDPF2Key = 00039464H;
vgaExtraLoresLaceDPF2Key = 00031445H;
vgaLoresLaceDPF2Key = 00039445H;
vgaProductLaceDPF2Key = 00039465H;
vgaExtraHalfBriteKey = 00031084H;
vgaExtraHalfBriteLaceKey = 00031085H;
a2024MonitorID = 00041000H;
a2024tenHertzKey = 00041000H;
a2024fifteenHertzKey = 00049000H;
protoMonitorID = 00051000H;
sUserFlags = {0.serFlags..7};
vsprite = 0;
saveBack = 1;
overlay = 2;
mustDraw = 3;
backSaved = 8;
bobUpdate = 9;
gelGone = 10;
vsOverflow = 11;
bUserFlags = {0.serFlags..7};
saveBob = 0;
bobIsComp = 1;
bWaiting = 8;
bDrawn = 9;
bobsAway = 10;
bobNix = 11;
savePreserve = 12;
outStep = 13;
anfracsize = 6;
animhalf = 0020H;
ringTrigger = 0001H;
TYPE
VUserStuff = INTEGER;
BUserStuff = INTEGER;
AUserStuff = INTEGER;
VSprite = STRUCT
nextVSprite : VSpritePtr;
prevVSprite : VSpritePtr;
drawPath : VSpritePtr;
clearPath : VSpritePtr;
oldY,oldX : INTEGER;
flags : SET;
y,x : INTEGER;
height : INTEGER;
width : INTEGER;
depth : INTEGER;
meMask : SET;
hitMask : SET;
imageData : e.APTR;
borderLine : e.APTR;
collMask : e.APTR;
sprColors : e.APTR;
vsBob : BobPtr;
planePick : SHORTSET;
planeOnOff : SHORTSET;
vUserExt : VUserStuff;
END;
Bob = STRUCT
flags : SET;
saveBuffer : e.APTR;
imageShadow : e.APTR;
before : BobPtr;
after : BobPtr;
bobVSprite : VSpritePtr;
bobComp : AnimCompPtr;
dBuffer : DBufPacketPtr;
bUserExt : BUserStuff;
END;
AnimComp = STRUCT
flags : SET;
timer : INTEGER;
timeSet : INTEGER;
nextComp : AnimCompPtr;
prevComp : AnimCompPtr;
nextSeq : AnimCompPtr;
prevSeq : AnimCompPtr;
animCRoutine : e.PROC;
yTrans : INTEGER;
xTrans : INTEGER;
headOb : AnimObPtr;
animBob : BobPtr;
END;
AnimOb = STRUCT
nextOb,prevOb : AnimObPtr;
clock : LONGINT;
anOldY,anOldX : INTEGER;
anY,anX : INTEGER;
yVel,xVel : INTEGER;
yAccel,xAccel : INTEGER;
ringYTrans,ringXTrans : INTEGER;
animoRoutine : e.PROC;
headComp : AnimCompPtr;
aUserExt : AUserStuff;
END;
DBufPacket = STRUCT
bufY,bufX : INTEGER;
bufPath : VSpritePtr;
bufBuffer : e.APTR;
END;
CONST
b2Norm = 0;
b2Swap = 1;
b2Bobber = 2;
TYPE
CollTable = STRUCT
collPtrs : ARRAY 16 OF e.APTR;
END;
Isrvstr = STRUCT (node : e.Node)
iptr : IsrvstrPtr;
code : e.PROC;
ccode : e.PROC;
carg : LONGINT;
END;
CONST
layerSimple = 0;
layerSmart = 1;
layerSuper = 2;
layerUpdating = 4;
layerBackdrop = 6;
layerRefresh = 7;
layerClipRectsLost = 8;
lmnRegion = -1;
TYPE
LayerInfo = STRUCT
layer : LayerPtr;
lp : LayerPtr;
obs : ClipRectPtr;
freeClipRects : e.MinList;
lock : e.SignalSemaphore;
head : e.List;
longreserved : LONGINT;
flags : SET;
count : SHORTINT;
lockLayersCount : SHORTINT;
layerInfoExtraSize : INTEGER;
blitbuff : e.APTR;
layerInfoExtra : e.PROC;
END;
CONST
newLayerInfoCalled = 1;
alertLayersNoMem = 83010000H;
TYPE
AreaInfo = STRUCT
vctrTbl : e.APTR;
vctrPtr : e.APTR;
flagTbl : e.APTR;
flagPtr : e.APTR;
count : INTEGER;
maxCount : INTEGER;
firstX,FirstY : INTEGER;
END;
TmpRas = STRUCT
rasPtr : e.APTR;
size : LONGINT;
END;
GelsInfo = STRUCT
sprRsrvd : SHORTINT;
flags : e.BYTE;
gelHead,gelTail : VSpritePtr;
nextLine : e.APTR;
lastColor : e.APTR;
collHandler : CollTablePtr;
leftmost,rightmost,topmost,bottommost : INTEGER;
firstBlissObj,lastBlissObj : e.APTR;
END;
RastPort = STRUCT
layer : LayerPtr;
bitMap : BitMapPtr;
areaPtrn : e.APTR;
tmpRas : TmpRasPtr;
areaInfo : AreaInfoPtr;
gelsInfo : GelsInfoPtr;
mask : SHORTSET;
fgPen : SHORTINT;
bgPen : SHORTINT;
aOlPen : SHORTINT;
drawMode : SHORTSET;
areaPtSz : SHORTINT;
linPatCnt : SHORTINT;
dummy : e.BYTE;
flags : SET;
linePtrn : INTEGER;
x,y : INTEGER;
minterms : ARRAY 8 OF e.BYTE;
penWidth : INTEGER;
penHeight : INTEGER;
font : TextFontPtr;
algoStyle : SHORTSET;
txFlags : SHORTSET;
txHeight : INTEGER;
txWidth : INTEGER;
txBaseline : INTEGER;
txSpacing : INTEGER;
user : e.APTR;
longreserved : ARRAY 2 OF LONGINT;
wordreserved : ARRAY 7 OF INTEGER;
reserved : ARRAY 8 OF e.BYTE;
END;
CONST
jam1 = SHORTSET{};
jam2 = SHORTSET{0};
complement = 1;
inversvid = 2;
firstDot = 0;
oneDot = 1;
dBuffer = 2;
areaOutline = 3;
noCrossFill = 5;
TYPE
RegionRectangle = STRUCT
next,prev : RegionRectanglePtr;
bounds : Rectangle;
END;
Region = STRUCT (bounds : Rectangle)
regionRectangle : RegionRectanglePtr;
END;
BitScaleArgs = STRUCT
srcX,srcY : INTEGER;
srcWidth,srcHeight : INTEGER;
xSrcFactor,ySrcFactor : INTEGER;
destX,destY : INTEGER;
destWidth,destHeight : INTEGER;
xDestFactor,yDestFactor : INTEGER;
srcBitMap : BitMapPtr;
destBitMap : BitMapPtr;
flags : LONGINT;
xdda,ydda : INTEGER;
reserved1 : LONGINT;
reserved2 : LONGINT;
END;
CONST
spriteAttached = 80H;
TYPE
SimpleSprite = STRUCT
posctldata : e.APTR;
height : INTEGER;
x,y : INTEGER;
num : INTEGER;
END;
CONST
normal = SHORTSET{};
normalFont = SHORTSET{};
underlined = 0;
bold = 1;
italic = 2;
extended = 3;
colorFont = 6;
tagged = 7;
romFont = 0;
diskFont = 1;
revPath = 2;
tallDot = 3;
wideDot = 4;
proportional = 5;
designed = 6;
removed = 7;
TYPE
TextAttr = STRUCT
name : e.STRPTR;
ySize : INTEGER;
style : SHORTSET;
flags : SHORTSET;
END;
TTextAttr = STRUCT
name : e.STRPTR;
ySize : INTEGER;
style : SHORTSET;
flags : SHORTSET;
tags : u.TagItemPtr;
END;
CONST
deviceDPI = 1 + u.user;
maxFontMatchweight = 32767;
TYPE
TextFont = STRUCT (message : e.Message)
ySize : INTEGER;
style : SHORTSET;
flags : SHORTSET;
xSize : INTEGER;
baseline : INTEGER;
boldSmear : INTEGER;
accessors : INTEGER;
loChar : CHAR;
hiChar : CHAR;
charData : e.APTR;
modulo : INTEGER;
charLoc : e.APTR;
charSpace : e.APTR;
charKern : e.APTR;
END;
CONST
noRemFont = 0;
TYPE
TextFontExtension = STRUCT
matchWord : INTEGER;
flags0 : SHORTSET;
flags1 : SHORTSET;
backPtr : TextFontPtr;
origReplyPort : e.MsgPortPtr;
tags : u.TagItemPtr;
oFontPatchS : e.APTR;
oFontPatchK : e.APTR;
END;
CONST
ctColorMask = {0.ColorMask..3};
ctColorFont = 0;
ctGreyFont = 1;
ctAntiAlias = 2;
ctMapColor = 0;
TYPE
ColorFontColors = STRUCT
reserved : INTEGER;
count : INTEGER;
colorTable : e.APTR;
END;
ColorTextFont = STRUCT (tf : TextFont)
flags : SET;
depth : SHORTINT;
fgColor : SHORTINT;
low : SHORTINT;
high : SHORTINT;
planePick : SHORTSET;
planeOnOff : SHORTSET;
colorFontColors : ColorFontColorsPtr;
charData : ARRAY 8 OF e.APTR;
END;
Textextent = STRUCT
width : INTEGER;
height : INTEGER;
extent : Rectangle;
END;
CONST
vTagEndCM = 00000000H;
vTagChromaKeyClr = 80000000H;
vTagChromaKeySet = 80000001H;
vTagBitPlaneKeyClr = 80000002H;
vTagBitPlaneKeySet = 80000003H;
vTagBorderBlankClr = 80000004H;
vTagBorderBlankSet = 80000005H;
vTagBorderNoTransClr = 80000006H;
vTagBorderNoTransSet = 80000007H;
vTagChromaPenClr = 80000008H;
vTagChromaPenSet = 80000009H;
vTagChromaPlaneSet = 8000000AH;
vTagAttachCMSet = 8000000BH;
vTagNextBufCM = 8000000CH;
vTagBatchCMClr = 8000000DH;
vTagBatchCMSet = 8000000EH;
vTagNormalDispGet = 8000000FH;
vTagNormalDisplSet = 80000010H;
vTagCoerceDispGet = 80000011H;
vTagCoerceDispSet = 80000012H;
vTagViewPortExtraGet = 80000013H;
vTagViewPortExtraSet = 80000014H;
vTagChromaKeyGet = 80000015H;
vTagBitPlaneKeyGet = 80000016H;
vTagBorderBlankGet = 80000017H;
vTagBorderNoTransGet = 80000018H;
vTagChromaPenGet = 80000019H;
vTagChromaPlaneGet = 8000001AH;
vTagAttachCMGet = 8000001BH;
vTagBatchCMGet = 8000001CH;
vTagBatchItemsGet = 8000001DH;
vTagBatchItemsSet = 8000001EH;
vTagBatchItemsAdd = 8000001FH;
vTagVPModeIDGet = 80000020H;
vTagVPMoedIDSet = 80000021H;
vTagVPModeIDClr = 80000022H;
vTagUserClipGet = 80000023H;
vTagUserClipSet = 80000024H;
vTagUserClipClr = 80000025H;
TYPE
ViewPort = STRUCT
next : ViewPortPtr;
colorMap : ColorMapPtr;
dspIns : CopListPtr;
sprIns : CopListPtr;
clrIns : CopListPtr;
uCopIns : UCopListPtr;
dWidth,dHeight : INTEGER;
dxOffset,dyOffset : INTEGER;
modes : SET;
spritePriorities : SHORTINT;
extendedModes : SHORTINT;
rasInfo : RasInfoPtr;
END;
View = STRUCT
viewPort : ViewPortPtr;
lofCprList : CprlistPtr;
shfCprList : CprlistPtr;
dyOffset,dxOffset : INTEGER;
modes : SET;
END;
ViewExtra = STRUCT (n : ExtendedNode)
view : ViewPtr;
monitor : MonitorSpecPtr;
END;
ViewPortExtra = STRUCT (n : ExtendedNode)
viewPort : ViewPortPtr;
displayClip : Rectangle;
END;
CONST
extendVStruct = 12;
genLockVideo = 1;
lace = 2;
superHires = 5;
pfba = 6;
extraHalfbrite = 7;
genlockAudio = 8;
dualpf = 10;
ham = 11;
extendedMode = 12;
vpHide = 13;
sprites = 14;
hires = 15;
a2024 = 6;
agnus = 5;
tenHz = 5;
TYPE
RasInfo = STRUCT
next : RasInfoPtr;
bitMap : BitMapPtr;
rxOffset,ryOffset : INTEGER;
END;
ColorMap = STRUCT
flags : SHORTSET;
type : SHORTINT;
count : INTEGER;
colorTable : e.APTR;
vpe : ViewPortExtraPtr;
transparencyBits : e.APTR;
transparencyPlane : SHORTINT;
reserved1 : e.BYTE;
reserved2 : INTEGER;
vp : ViewPortPtr;
normalDisplayInfo : DisplayInfoPtr;
coerceDisplayInfo : DisplayInfoPtr;
cmBatchItems : u.TagItemPtr;
vpModeID : LONGINT;
END;
CONST
colorMapTypeV12 = 0;
colorMapTypeV14 = 1;
colorMapTypeV36 = colorMapTypeV14;
colroMapTransparency = 0;
colorPlaneTransparency = 1;
borderBlanking = 2;
boderNoTransparency = 3;
videoControlBatch = 4;
userCopperClip = 5;
TYPE
GfxBase = STRUCT (libNode : e.Library)
actiView : ViewPtr;
copinit : CopinitPtr;
cia : e.APTR;
blitter : e.APTR;
loFlist : e.APTR;
shFlist : e.APTR;
blthd,blttl : h.BltnodePtr;
bsblthd,bsblttl : h.BltnodePtr;
vbsrv,timsrv,bltsrv : e.Interrupt;
textFonts : e.List;
defaultFont : TextFontPtr;
modes : SET;
vBlank : e.BYTE;
debug : e.BYTE;
beamSync : INTEGER;
bplcon0 : SET;
spriteReserved : e.BYTE;
bytereserved : e.BYTE;
flags : SET;
blitLock : INTEGER;
blitNest : INTEGER;
blitWaitQ : e.List;
blitOwner : e.TaskPtr;
waitQ : e.List;
displayFlags : SET;
simpleSprites : e.APTR;
maxDisplayRow : INTEGER;
maxDisplayColumn : INTEGER;
normalDisplayRows : INTEGER;
normalDisplayColumns : INTEGER;
normalDPMX : INTEGER;
normalDPMY : INTEGER;
lastChanceMemory : e.SignalSemaphore;
lcMptr : e.APTR;
microsPerLine : INTEGER;
minDisplayColumn : INTEGER;
chipRevBits0 : SHORTSET;
reserved : ARRAY 4 OF e.BYTE;
monitorID : INTEGER;
hedley : ARRAY 8 OF LONGINT;
hedleySprites : ARRAY 8 OF LONGINT;
hedleySprites1 : ARRAY 8 OF LONGINT;
hedleyCount : INTEGER;
hedleyFlags : SET;
hedleyTmp : INTEGER;
hashTable : e.APTR;
currentTotRows : INTEGER;
currentTotCclks : INTEGER;
hedleyHint : e.BYTE;
hedleyHint2 : e.BYTE;
nreserved : ARRAY 4 OF LONGINT;
a2024SyncRaster : e.APTR;
controlDeltaPAL : INTEGER;
controlDeltaNTSC : INTEGER;
currentMonitor : MonitorSpecPtr;
monitorList : e.List;
defaultMonitor : MonitorSpecPtr;
monitorListSemaphore : e.SignalSemaphore;
displayInfoDataBase : e.APTR;
actiViewCprSemaphore : e.SignalSemaphorePtr;
utilityBase : e.LibraryPtr;
execBase : e.LibraryPtr;
END;
CONST
ntsc = 0;
genloc = 1;
pal = 2;
todaSafe = 3;
blitMsgFault = 4;
bigBlits = 0;
hrAgnus = 0;
hrDenise = 1;
graphicsName = "graphics.library";
VAR
gfx : GfxBasePtr;
PROCEDURE BltBitMap(srcBitMap: BitMapPtr; xSrc: INTEGER; ySrc: INTEGER; destBitMap: BitMapPtr; xDest: INTEGER; yDest: INTEGER; xSize: INTEGER; ySize: INTEGER; minterm: e.BYTE; mask: SHORTSET; tempA: PLANEPTR): LONGINT;
PROCEDURE BltTemplate(source: PLANEPTR; xSrc: INTEGER; srcMod: INTEGER; destRP: RastPortPtr; xDest: INTEGER; yDest: INTEGER; xSize: INTEGER; ySize: INTEGER);
PROCEDURE ClearEOL(rp: RastPortPtr);
PROCEDURE ClearScreen(rp: RastPortPtr);
PROCEDURE TextLength(rp: RastPortPtr; string: ARRAY OF CHAR; count: LONGINT): INTEGER;
PROCEDURE Text(rp: RastPortPtr; string: ARRAY OF CHAR; count: LONGINT);
PROCEDURE SetFont(rp: RastPortPtr; textFont: TextFontPtr);
PROCEDURE OpenFont(textAttr: TextAttr): TextFontPtr;
PROCEDURE CloseFont(textFont: TextFontPtr);
PROCEDURE AskSoftStyle(rp: RastPortPtr): SHORTSET;
PROCEDURE SetSoftStyle(rp: RastPortPtr; style: SHORTSET; enable: SHORTSET): SHORTSET;
PROCEDURE AddBob(bob: BobPtr; rp: RastPortPtr);
PROCEDURE AddVSprite(vSprite: VSpritePtr; rp: RastPortPtr);
PROCEDURE DoCollision(rp: RastPortPtr);
PROCEDURE DrawGList(rp: RastPortPtr; vp: ViewPortPtr);
PROCEDURE InitGels(head: VSpritePtr; tail: VSpritePtr; gelsInfo: GelsInfoPtr);
PROCEDURE InitMasks(vSprite: VSpritePtr);
PROCEDURE RemIBob(bob: BobPtr; rp: RastPortPtr; vp: ViewPortPtr);
PROCEDURE RemVSprite(vSprite: VSpritePtr);
PROCEDURE SetCollision(num: LONGINT; routine: e.PROC; gelsInfo: GelsInfoPtr);
PROCEDURE SortGList(rp: RastPortPtr);
PROCEDURE AddAnimOb(anOb: AnimObPtr; VAR anKey: AnimObPtr; rp: RastPortPtr);
PROCEDURE Animate(VAR anKey: AnimObPtr; rp: RastPortPtr);
PROCEDURE GetGBuffers(anOb: AnimObPtr; rp: RastPortPtr; flag: BOOLEAN): BOOLEAN;
PROCEDURE InitGMasks(animOb: AnimObPtr);
PROCEDURE DrawEllipse(rp: RastPortPtr; xCenter: INTEGER; yCenter: INTEGER; a: INTEGER; b: INTEGER);
PROCEDURE AreaEllipse(rp: RastPortPtr; xCenter: INTEGER; yCenter: INTEGER; a: INTEGER; b: INTEGER): BOOLEAN;
PROCEDURE LoadRGB4(vp: ViewPortPtr; colors: ARRAY OF INTEGER; count: LONGINT);
PROCEDURE InitRastPort(VAR rp: RastPort);
PROCEDURE InitVPort(VAR vp: ViewPort);
PROCEDURE MrgCop(view: ViewPtr);
PROCEDURE MakeVPort(view: ViewPtr; vp: ViewPortPtr);
PROCEDURE LoadView(view: ViewPtr);
PROCEDURE WaitBlit();
PROCEDURE SetRast(rp: RastPortPtr; pen: INTEGER);
PROCEDURE Move(rp: RastPortPtr; x: INTEGER; y: INTEGER);
PROCEDURE Draw(rp: RastPortPtr; x: INTEGER; y: INTEGER);
PROCEDURE AreaMove(rp: RastPortPtr; x: INTEGER; y: INTEGER): BOOLEAN;
PROCEDURE AreaDraw(rp: RastPortPtr; x: INTEGER; y: INTEGER): BOOLEAN;
PROCEDURE AreaEnd(rp: RastPortPtr): BOOLEAN;
PROCEDURE WaitTOF();
PROCEDURE QBlit(blit: h.BltnodePtr);
PROCEDURE InitArea(VAR areaInfo: AreaInfo; vectorBuffer: e.APTR; maxVectors: LONGINT);
PROCEDURE SetRGB4(vp: ViewPortPtr; index: INTEGER; red: INTEGER; green: INTEGER; blue: INTEGER);
PROCEDURE QBSBlit(blit: h.BltnodePtr);
PROCEDURE BltClear(memBlock: PLANEPTR; byteCount: LONGINT; flags: LONGSET);
PROCEDURE RectFill(rp: RastPortPtr; xMin: INTEGER; yMin: INTEGER; xMax: INTEGER; yMax: INTEGER);
PROCEDURE BltPattern(rp: RastPortPtr; mask: PLANEPTR; xMin: INTEGER; yMin: INTEGER; xMax: INTEGER; yMax: INTEGER; bytecnt: INTEGER);
PROCEDURE ReadPixel(rp: RastPortPtr; x: INTEGER; y: INTEGER): LONGINT;
PROCEDURE WritePixel(rp: RastPortPtr; x: INTEGER; y: INTEGER): BOOLEAN;
PROCEDURE Flood(rp: RastPortPtr; mode: LONGINT; x: INTEGER; y: INTEGER): BOOLEAN;
PROCEDURE PolyDraw(rp: RastPortPtr; count: INTEGER; polyTable: ARRAY OF Point);
PROCEDURE PolyDrawList(rp: RastPortPtr; count: INTEGER; coors..: INTEGER);
PROCEDURE SetAPen(rp: RastPortPtr; pen: INTEGER);
PROCEDURE SetBPen(rp: RastPortPtr; pen: INTEGER);
PROCEDURE SetDrMd(rp: RastPortPtr; drawMode: SHORTSET);
PROCEDURE InitView(VAR view: View);
PROCEDURE CBump(copList: UCopListPtr);
PROCEDURE CMove(copList: UCopListPtr; destination: e.APTR; data: INTEGER);
PROCEDURE CWait(copList: UCopListPtr; v: INTEGER; h: INTEGER);
PROCEDURE VBeamPos(): LONGINT;
PROCEDURE InitBitMap(VAR bitMap: BitMap; depth: INTEGER; width: INTEGER; height: INTEGER);
PROCEDURE ScrollRaster(rp: RastPortPtr; x: INTEGER; y: INTEGER; xMin: INTEGER; yMin: INTEGER; xMax: INTEGER; yMax: INTEGER);
PROCEDURE WaitBOVP(vp: ViewPortPtr);
PROCEDURE GetSprite(VAR sprite: SimpleSprite; num: INTEGER): INTEGER;
PROCEDURE FreeSprite(num: INTEGER);
PROCEDURE ChangeSprite(vp: ViewPortPtr; VAR sprite: SimpleSprite; newData: PLANEPTR);
PROCEDURE MoveSprite(vo: ViewPortPtr; VAR sprite: SimpleSprite; x: INTEGER; y: INTEGER);
PROCEDURE LockLayerRom(layer: LayerPtr);
PROCEDURE UnlockLayerRom(layer: LayerPtr);
PROCEDURE SyncSBitMap(layer: LayerPtr);
PROCEDURE CopySBitMap(layer: LayerPtr);
PROCEDURE OwnBlitter();
PROCEDURE DisownBlitter();
PROCEDURE InitTmpRas(VAR tmpras: TmpRas; buffer: PLANEPTR; size: LONGINT);
PROCEDURE AskFont(rp: RastPortPtr; textAttr: TextAttr);
PROCEDURE AddFont(textfont: TextFontPtr);
PROCEDURE RemFont(textfont: TextFontPtr);
PROCEDURE AllocRaster(width: INTEGER; height: INTEGER): PLANEPTR;
PROCEDURE FreeRaster(p: PLANEPTR; width: INTEGER; height: INTEGER);
PROCEDURE AndRectRegion(region: RegionPtr; rectangle: Rectangle);
PROCEDURE OrRectRegion(region: RegionPtr; rectangle: Rectangle): BOOLEAN;
PROCEDURE NewRegion(): RegionPtr;
PROCEDURE ClearRectRegion(region: RegionPtr; rectangle: Rectangle): BOOLEAN;
PROCEDURE ClearRegion(region: RegionPtr);
PROCEDURE DisposeRegion(region: RegionPtr);
PROCEDURE FreeVPortCopLists(vp: ViewPortPtr);
PROCEDURE FreeCopList(copList: CopListPtr);
PROCEDURE ClipBlit(srcRP: RastPortPtr; xSrc: INTEGER; ySrc: INTEGER; destRP: RastPortPtr; xDest: INTEGER; yDest: INTEGER; xSize: INTEGER; ySize: INTEGER; minterm: e.BYTE);
PROCEDURE XorRectRegion(region: RegionPtr; rectangle: Rectangle): BOOLEAN;
PROCEDURE FreeCprList(cprlist: CprlistPtr);
PROCEDURE GetColorMap(entries: LONGINT): ColorMapPtr;
PROCEDURE FreeColorMap(colorMap: ColorMapPtr);
PROCEDURE GetRGB4(colorMap: ColorMapPtr; entry: LONGINT): INTEGER;
PROCEDURE ScrollVPort(vp: ViewPortPtr);
PROCEDURE UCopperListInit(uCopList: UCopListPtr; n: LONGINT): CopListPtr;
PROCEDURE FreeGBuffers(anOb: AnimObPtr; rp: RastPortPtr; flag: BOOLEAN);
PROCEDURE BltBitMapRastPort(srcBitMap: BitMapPtr; xSrc: INTEGER; ySrc: INTEGER; destRP: RastPortPtr; xDest: INTEGER; yDest: INTEGER; xSize: INTEGER; ySize: INTEGER; minterm: e.BYTE);
PROCEDURE OrRegionRegion(srcRegion: RegionPtr; destRegion: RegionPtr): BOOLEAN;
PROCEDURE XorRegionRegion(srcRegion: RegionPtr; destRegion: RegionPtr): BOOLEAN;
PROCEDURE AndRegionRegion(srcRegion: RegionPtr; destRegion: RegionPtr): BOOLEAN;
PROCEDURE SetRGB4CM(colorMap: ColorMapPtr; index: INTEGER; red: INTEGER; green: INTEGER; blue: INTEGER);
PROCEDURE BltMaskBitMapRastPort(srcBitMap: BitMapPtr; xSrc: INTEGER; ySrc: INTEGER; destRP: RastPortPtr; xDest: INTEGER; yDest: INTEGER; xSize: INTEGER; ySize: INTEGER; minterm: e.BYTE; bltMask: PLANEPTR);
PROCEDURE AttemptLockLayerRom(layer: LayerPtr): BOOLEAN;
PROCEDURE GfxNew(gfxNodeType: LONGINT): ExtendedNodePtr;
PROCEDURE GfxFree(gfxNodePtr: ExtendedNodePtr);
PROCEDURE GfxAssociate(associateNode: ExtendedNodePtr; gfxNodePtr: ExtendedNodePtr);
PROCEDURE BitMapScale(bitScaleArgs: BitScaleArgsPtr);
PROCEDURE ScalerDiv(factor: LONGINT; numerator: LONGINT; denominator: LONGINT): INTEGER;
PROCEDURE TextExtent(rp: RastPortPtr; string: ARRAY OF CHAR; count: LONGINT; textExtent: TextextentPtr): INTEGER;
PROCEDURE TextFit(rp: RastPortPtr; string: ARRAY OF CHAR; strLen: LONGINT; textExtent: TextextentPtr; constrainingExtent: TextextentPtr; strDirection: LONGINT; constrainingBitWidth: LONGINT; constrainingBitHeight: LONGINT): LONGINT;
PROCEDURE GfxLookUp(associateNode: ExtendedNodePtr): e.APTR;
PROCEDURE VideoControl(colorMap: ColorMapPtr; tagarray: ARRAY OF u.TagItem): BOOLEAN;
PROCEDURE VideoControlTagList(colorMap: ColorMapPtr; tags..: u.Tag): BOOLEAN;
PROCEDURE OpenMonitor(monitorName: ARRAY OF CHAR; displayID: LONGINT): MonitorSpecPtr;
PROCEDURE CloseMonitor(monitorSpec: MonitorSpecPtr): BOOLEAN;
PROCEDURE FindDisplayInfo(displayID: LONGINT): DisplayInfoHandle;
PROCEDURE NextDisplayInfo(displayID: LONGINT): LONGINT;
PROCEDURE AddDisplayInfo;
PROCEDURE AddDisplayInfoData;
PROCEDURE SetDisplayInfoData(handle: DisplayInfoHandle; buf: ARRAY OF e.BYTE; size: LONGINT; tagID: LONGINT; displayID: LONGINT): LONGINT;
PROCEDURE GetDisplayInfoData(handle: DisplayInfoHandle; VAR buf: ARRAY OF e.BYTE; size: LONGINT; tagID: LONGINT; displayID: LONGINT): LONGINT;
PROCEDURE FontExtent(font: TextFontPtr; fontExtent: TextFontExtensionPtr);
PROCEDURE ReadPixelLine8(rp: RastPortPtr; xstart: INTEGER; ystart: INTEGER; width: INTEGER; VAR array: ARRAY OF e.BYTE; tempRP: RastPortPtr): LONGINT;
PROCEDURE WritePixelLine8(rp: RastPortPtr; xstart: INTEGER; ystart: INTEGER; width: INTEGER; array: ARRAY OF e.BYTE; tempRP: RastPortPtr): LONGINT;
PROCEDURE ReadPixelArray8(rp: RastPortPtr; xstart: INTEGER; ystart: INTEGER; xstop: INTEGER; ystop: INTEGER; width: INTEGER; VAR array: ARRAY OF e.BYTE; tempRP: RastPortPtr): LONGINT;
PROCEDURE WritePixelArray8(rp: RastPortPtr; xstart: INTEGER; ystart: INTEGER; xstop: INTEGER; ystop: INTEGER; width: INTEGER; array: ARRAY OF e.BYTE; tempRP: RastPortPtr): LONGINT;
PROCEDURE GetVPModeID(vp: ViewPortPtr): LONGINT;
PROCEDURE ModeNotAvailable(modeID: LONGINT): LONGINT;
PROCEDURE WeighTAMatch(reqTextAttr: TextAttr; VAR targetTextAttr: TextAttr; targetTags: ARRAY OF u.TagItem): INTEGER;
PROCEDURE WeighTAMatchTagList(reqTextAttr: TextAttr; VAR targetTextAttr: TextAttr; tags..: u.Tag): INTEGER;
PROCEDURE EraseRect(rp: RastPortPtr; xMin: INTEGER; yMin: INTEGER; xMax: INTEGER; yMax: INTEGER);
PROCEDURE ExtendFont(font: TextFontPtr; fontTags: ARRAY OF u.TagItem): BOOLEAN;
PROCEDURE StripFont(font: TextFontPtr);
PROCEDURE RASSIZE(w, h: INTEGER): LONGINT;
PROCEDURE RemBob(b: BobPtr);
PROCEDURE OnDisplay;
PROCEDURE OffDisplay;
PROCEDURE OnSprite;
PROCEDURE OffSprite;
PROCEDURE OnVBlank;
PROCEDURE OffVBlank;
PROCEDURE SetOPen(w: RastPortPtr; c: e.BYTE);
PROCEDURE SetDrPt(w: RastPortPtr; p: INTEGER);
PROCEDURE SetWrMsk(w: RastPortPtr; m: SHORTSET);
PROCEDURE SetAfPt(w: RastPortPtr; p: e.ADDRESS; n: e.BYTE);
PROCEDURE BndryOff(w: RastPortPtr);
PROCEDURE CINIT(c: UCopListPtr; n: LONGINT);
PROCEDURE CMOVE(c: UCopListPtr; a: e.ADDRESS; b: INTEGER);
PROCEDURE CWAIT(c: UCopListPtr; a, b: INTEGER);
PROCEDURE CEND(c: UCopListPtr);
PROCEDURE DrawCircle(rp: RastPortPtr; cx, cy: INTEGER; r: INTEGER);
PROCEDURE AreaCircle(rp: RastPortPtr; cx, cy: INTEGER; r: INTEGER): BOOLEAN;
END Graphics.